﻿<Window x:Class="ForumsBrowser.MiniView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:fb="clr-namespace:ForumsBrowser"
    Title="Forums Browser" WindowStyle="None" BorderThickness="0" Background="Transparent" Width="201" Height="{Binding ElementName=miniWindow, Path=MiniViewMinHeight}" x:Name="miniWindow"
       Topmost="True" ResizeMode="NoResize" AllowsTransparency="True"
       HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
        MouseEnter="miniWindow_MouseEnter" MouseLeave="miniWindow_MouseLeave">
    <Window.Resources>
        <fb:ThreadViewer x:Key="threadViewer" VerticalAlignment="Stretch" />
        <fb:TopToBottomConverter x:Key="TopToBottomConverter"/>
        <ScrollBar x:Key="scrollbar" x:Name="backgroundScroll"/>
        <Storyboard x:Key="fadeIn">
            <DoubleAnimation BeginTime="0:0:0.25" Duration="0:0:0.5" Storyboard.TargetProperty="Opacity" To="1"/>
        </Storyboard>
        <Storyboard x:Key="fadeOut">
            <DoubleAnimation BeginTime="0:0:0.25" Duration="0:0:0.5" Storyboard.TargetProperty="Opacity" To="0"/>
        </Storyboard>
        <Storyboard x:Key="openList">
            <DoubleAnimation BeginTime="0:0:0.25" Duration="0:0:0.5" AccelerationRatio="0.8" Storyboard.TargetName="miniWindow" Storyboard.TargetProperty="Height"  To="612" />
            <DoubleAnimation BeginTime="0:0:0.25" Duration="0:0:0.5" Storyboard.TargetName="topGrid" Storyboard.TargetProperty="Opacity" To="1"/>
            <!--<DoubleAnimation BeginTime="0:0:0.25" Duration="0:0:0.5" Storyboard.TargetName="mainGrid" Storyboard.TargetProperty="Opacity" To="1"/>-->
        </Storyboard>
        <Storyboard x:Key="closeList" BeginTime="0:0:0">
            <DoubleAnimation BeginTime="0:0:0.25" Duration="0:0:0.5" DecelerationRatio="0.5" Storyboard.TargetName="miniWindow" Storyboard.TargetProperty="Height"  To="{Binding ElementName=miniWindow, Path=MiniViewMinHeight}" />
            <DoubleAnimation BeginTime="0:0:0.25" Duration="0:0:0.5" Storyboard.TargetName="topGrid" Storyboard.TargetProperty="Opacity" To="0"/>
            <!--<DoubleAnimation BeginTime="0:0:0.25" Duration="0:0:0.5" Storyboard.TargetName="mainGrid" Storyboard.TargetProperty="Opacity" To="1"/>-->
        </Storyboard>
    </Window.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="20"/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid Grid.Row="0" x:Name="topGrid" >
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition Width="18"/>
                <ColumnDefinition Width="18"/> 
            </Grid.ColumnDefinitions>
            <Border MouseDown="TextBlock_MouseDown" Background="{DynamicResource NormalBrush}" BorderBrush="{DynamicResource NormalBorderBrush}" CornerRadius="5" BorderThickness="1" >
            <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="11" Grid.Column="0" >Forums Browser</TextBlock>               
            </Border>
            <Border Grid.Column="1" Background="{DynamicResource NormalBrush}" BorderBrush="{DynamicResource NormalBorderBrush}" CornerRadius="5" BorderThickness="1" >
                <Button Click="Button_Click_1" HorizontalContentAlignment="Center" VerticalContentAlignment="Top" FontSize="10"
                    Content="_" Background="{DynamicResource NormalBrush}" Foreground="White" />
            </Border>
            <Border Grid.Column="2" Background="{DynamicResource NormalBrush}" BorderBrush="{DynamicResource NormalBorderBrush}" CornerRadius="5" BorderThickness="1" >
                <Button Click="Button_Click" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
                    Content="X" Background="{DynamicResource NormalBrush}" Foreground="White" />
            </Border>
        </Grid>
        <Grid Grid.Row="1" Grid.Column="0" x:Name="mainGrid" OverridesDefaultStyle="True">

        </Grid>
    </Grid>
</Window>
